public class Test24 {
    public static void main(String[] args) {
        User u1 = new User("张三", '男', "666666", true);
        User u2 = new User("李四", '男', "999999", false);

        System.out.println(u1);
        System.out.println(u2);
    }
}

class User {
    private String name;

    private char sex;

    private String password;

    private boolean lock;

    public User() {

    }

    public User(String name, char sex, String password, boolean lock) {
        this.name = name;
        this.sex = sex;
        this.password = password;
        this.lock = lock;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public boolean isLock() {
        return lock;
    }

    public void setLock(boolean lock) {
        this.lock = lock;
    }

    @Override
    public String toString() {
        return "UserName = " + this.getName() + "\nsex = " + this.getSex() + "\npassword = " + this.getPassword() + "\nlock = " + this.isLock();
    }
}